<?php 
defined('IN_ADMIN') or exit('No permission resources.');
$show_dialog = $show_header = 1;
include $this->admin_tpl('header_v2.0', 'admin');
$thisExt = isset($this->M['ext'])?$this->M['ext']:'';
$authkey = upload_key('1,'.$thisExt.',1');
?>
<script>
    $(document).ready(function() {
        $(".js-radio-num").click(function(event) {
            if($(this).prop('checked') == true){
                $("#start_time_row").hide();
            $("#index_data").show();
            }
        });
        $(".js-radio-time").click(function(event) {
            if($(this).prop('checked') == true){
            $("#index_data").hide();
                $("#start_time_row").show();
            }
        });
    });
</script>
<div id="content"> 
    <div class="row">
        <article id="widget-grid" class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
            <div class="jarviswidget jarviswidget-color-darken" id="index_data_conf_<?php echo $_GET['menuid']?>" data-widget-editbutton="false"data-widget-togglebutton="false"  data-widget-deletebutton="false" data-widget-fullscreenbutton="false">
                <header>
                      <span class="widget-icon"> <i class="fa fa-table txt-color-white"></i> </span>
                     <h2>首页数据开始位置配置</h2>
                </header>
                <div>
                    <div class="widget-body no-padding">
                        <div class="widget-body-toolbar">
                            <form name="searchform" action="?m=shuafen&c=index&a=index_data_conf" method="post"  id="myform">
                                <input  type="hidden" name="id" value="<?php echo $num['id'];?>"/>
                                <div class="row mb10">
                                    <div class="col-sm-4 " id="wrap">类型：
                                        <input name="type" class="js-radio-num" type="radio" value="num" />下载量
                                        <input name="type" class="js-radio-time" type="radio" value="time" />时间
                                    </div>
                                </div>
                                <div class="row mb10" id="index_data">
                                    <div class="col-sm-4 ">
                                        下载量配置：<input name="index_data_conf" type="text" value="<?php echo $num['index_data_conf'] ?>" class="input-text form-control" />
                                    </div>
                                </div>
                                <div class="row mb10"  id="start_time_row">
                                    <div class="col-sm-4 ">
                                        时间配置：<?php echo form::date('start_time', $start_time,1)?>
                                    </div>
                                </div>
                                <div class="row mb10">
                                    <div class="col-sm-1 ">
                                        &nbsp;<br>
                                        <button type="submit" name="dosubmit"  class="btn btn-primary"> <i class="fa fa-square"></i> <?php echo L('ok');?></button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </article>
    </div>
</div>
<script type="text/javascript">
    $('#wrap').click(function(){
        var type = $('input[name = "type"]').val();
        console.log(type);
    })
</script>
</body>
</html>
